<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@include file="header.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Add news </title>
<style>
 .td1 { background-color:#E4EDF9; }
 .td2 { background-color:#F1F3F5; } 
</style>
</head>
<body>
<script>
	function checkAndSubmit(){
		var form = document.getElementById("updateNewsForm");
		form.submit();
	}
</script>
<script>
	function getObj(obj){
		return document.getElementById(obj)
	};
	function Sendnow(){
		frames['editor'].GetCon();
		var form = document.getElementById("updateNewsForm");
		if ( form.newsTypeId.value = ""){
			alert("必须输入新闻类别,如果新闻类别没有，请在新闻类别管理编辑!");
			form.newsTypeId.focus();
			return false;
		}
		form.submit();
	 	//alert($("content").value); 
	};
	function checkAndSubmit(){
		var form = document.getElementById("updateNewsForm");
		form.submit();
	}
</script>
<form method="post" action="updateNews.action" id="updateNewsForm">

<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
	<tr>
		<td class="td1">新闻类别:</td>
		<td class="td1"> 
		 
		 <s:select list="newsTypeList"  listValue="typeName"  listKey="id"  name="newsTypeId"  id="newsTypeId"
		 value="newsBean.newsTypeId"  >
 </s:select>
		</td>
	</tr>
	<tr>
		<td class="td2">标题:</td>
		<td class="td2"><input type="text" name="title" id="title" size="80"  value="<s:property value='newsBean.title'/>" />
		</td>
	</tr>
	<tr>
		<td class="td1">概要:</td>
		<td class="td1"><input type="text" name="summary" id="summary"  size="80"  value="<s:property value='newsBean.summary'/>"/></td>
	</tr>
	<tr>
		<td class="td2">内容:</td>
		<td class="td2">
			<%--
			<input type="text" name="content" id="content" value="<s:property value='newsBean.content'/>" />
			 --%>
			<textarea id='content'  name='content' style='display:none'><s:property value='newsBean.content'/></textarea>
			<iframe name='editor' src='edit/edit.action?V=content&T=2&A=1&uploadFolder=<%=com.windfone.common.Constant.UPLOAD_NEWS %>' frameBorder='0' marginHeight='0' marginWidth='0' scrolling='no' style='height:250px;width:640px'></iframe>
		</td>
	</tr>
 
	<tr>

		<td colspan="2" class="td1">
		<input type="button" value="Save"  onclick="Sendnow()"/>&nbsp;
		<input type="hidden" value="<s:property value='newBean.id'/>"  name="newId"  id="newId"  />
		<input type="button" value="reset" />&nbsp;
		<input	type="button" value="返回"  onclick="javascript:window.location.href='newsList.action';" />
		</td>
</table>
</form>
</body>
</html>
